<?php
/*
  $Id: allmanufacturers.php, v2.0 for osCommercev2.3.1

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 - 2010 osCommerce

  All Manufacturers by Alex Kaiser
  alex@pooliestudios.com
  www.pooliestudios.com

  Edited by Roman Gruhn
  romangruhn@yahoo.de

  Edited by Hakan Haknuz


  Released under the GNU General Public License
	Riveduto e corretto da Remigio Ruberto www.100asa.it 12/08/04
*/

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLMANUFACTURERS);

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ALLMANUFACTURERS));

  require(DIR_WS_INCLUDES . 'template_top.php'); 
?>


<h1><?php echo HEADING_TITLE; ?></h1>

<div class="contentContainer">
  <div class="contentText">

<?php
  $manufacturers_query_raw = "select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name";
   
 
  $manufacturers_split = new splitPageResults($manufacturers_query_raw, MAX_DISPLAY_ALLMANUFACTURERS);

  if (($manufacturers_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>

    <div>
      <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $manufacturers_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span>

    </div>

    <br />

<?php
  }
?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
<?php
    $row = 0;
    $manufacturers_query = tep_db_query($manufacturers_split->sql_query);

    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
      $row++;
      echo '        <td align="center" width="33%"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name']) . '">'. $manufacturers['manufacturers_name'] . '</a><br />' . PHP_EOL;
      if ($manufacturers['manufacturers_image']) {
        echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name']) . '">' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . '</a>';
      }
      echo '</td>' . PHP_EOL;

      if ((($row / 3) == floor($row / 3))) {
?>
      </tr>
      <tr>
<?php
      }
    }
?>
      </tr>
    </table>

<?php
  if (($manufacturers_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>

    <br />

    <div>
      <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $manufacturers_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span>

    </div>

<?php
  }
?>

  </div>
</div>

    
<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>